home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / tegl6b.zip / INTROPAK.EXE / lha / BUTTON2.PAS < prev    next >
Pascal/Delphi Source File  |  1991-07-16  |  679b  |  31 lines

  1. {-- button2.pas}
  2. {$F+}
  3.  
  4. USES moreicon,teglunit,teglmain;
  5.  
  6. VAR ifs : ImageStkPtr;
  7.  
  8. function cancelevent(frame: ImageStkPtr; mouse: MsClickPtr): Word;
  9.   BEGIN
  10.     {-- if true then the button has been released }
  11.     if VisualSquareButtonPress(frame,mouse) then
  12.       begin
  13.         {-- this will pop the button back up }
  14.         ReleaseSquareButton(frame,mouse);
  15.         {-- and dispose of the frame. }
  16.         dropstackimage(ifs);
  17.       end;
  18.   END;
  19.  
  20. BEGIN
  21.   easytegl;
  22.   easyout;
  23.   PushImage(50,50,200,150);
  24.   ShadowBox(50,50,200,150);
  25.   ifs := StackPtr;
  26.   DefineSquareButtonClick(ifs,30,35,120,65,35,5,@ImageBulb,cancelevent);
  27.   TeglSupervisor;
  28. END.
  29.  
  30.  
  31.